Clear the completion flags before appending the common prefix
authorFederico Mena Quintero <federico@gnu.org>
Thu, 13 Mar 2008 00:39:56 +0000 (00:39 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Thu, 13 Mar 2008 00:39:56 +0000 (00:39 +0000)
Signed-off-by: Federico Mena Quintero <federico@gnu.org>
svn path=/trunk/; revision=19832

gtk/gtkfilechooserentry.c

index b1fc819d6634bca6abb27e4724b1f6037d3d4f5e..c6c78140f70a6b24f29888e47422a191b4f4259d 100644 (file)
@@ -372,6 +372,13 @@ completion_match_func (GtkEntryCompletion *comp,
   return result;
 }
 
+static void
+clear_completions (GtkFileChooserEntry *chooser_entry)
+{
+  chooser_entry->has_completion = FALSE;
+  chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
+}
+
 /* This function will append a directory separator to paths to
  * display_name iff the path associated with it is a directory.
  * maybe_append_separator_to_path will g_free the display_name and
@@ -513,6 +520,8 @@ append_common_prefix (GtkFileChooserEntry *chooser_entry,
   gchar *common_prefix;
   GtkFilePath *unique_path;
 
+  clear_completions (chooser_entry);
+
   find_common_prefix (chooser_entry, &common_prefix, &unique_path);
 
   if (unique_path)
@@ -586,13 +595,6 @@ gtk_file_chooser_entry_do_insert_text (GtkEditable *editable,
     install_start_autocompletion_idle (chooser_entry);
 }
 
-static void
-clear_completions (GtkFileChooserEntry *chooser_entry)
-{
-  chooser_entry->has_completion = FALSE;
-  chooser_entry->load_complete_action = LOAD_COMPLETE_NOTHING;
-}
-
 static void
 clear_completions_if_not_in_change (GtkFileChooserEntry *chooser_entry)
 {